<template>
	<view class="bg-fff">
		<swiper :indicator-dots="true">
			<swiper-item v-for="item in 4" :key="item">
				<view class="swiper-item">
					<image src="../../static/img/home/banner.png" mode="widthFix"></image>
				</view>
			</swiper-item>
		</swiper>
		
		<view class="padding-top margin-top">
			<u-divider
				color="#444" 
				border-color="#ff5500"
			>推荐活动</u-divider>
		</view>
		
		<view class="act-cont">
			<view class="activity" v-for="(item,index) in 4" :key="index">
				<image src="../../static/img/home/pic11.png" mode=""></image>
				<view class="fs-28">
					2019年大学生寒假实习
				</view>
				<view class="fs-24 color-666">
					囊括各种专业
				</view>
			</view>
		</view>
		
		<view class="padding-top">
			<u-divider
				color="#444" 
				border-color="#ff5500"
			>推荐岗位</u-divider>
		</view>
		
		<JobItem
			ishot
			v-for="(item,index) in joblist" 
			:key="item.objectId"
			:jobdata="item"
		/>
	</view>
</template>

<script>
	import {getJobList} from '../../api/job.js'
	export default {
		data() {
			return {
				joblist:[]
			};
		},
		onLoad() {
			getJobList({condition:{hot:true}}).then(res=>{
					console.log(res);
					this.joblist = res.results
				})
		}
	}
</script>

<style lang="scss">
swiper-item{
	image{
		width: 100%;
	}
}
.act-cont{
	padding: 30upx;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	.activity{
		margin-bottom:30upx ;
		image{
			width: 330upx;
			height: 200upx;
		}
	}
}
</style>
